package com.onlinelearn.courseservice.repository;

import com.onlinelearn.courseservice.model.Course;
import com.onlinelearn.courseservice.model.CourseCategory;
import com.onlinelearn.courseservice.model.CourseStatus;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CourseRepository extends JpaRepository<Course, Long> {
    List<Course> findByCategoryAndStatus(CourseCategory category, CourseStatus status);
    List<Course> findByTeacherId(Long teacherId);
} 